package com.lagou.user.dao;

import com.lagou.user.bean.Token;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

@Repository
public interface TokenRepository extends JpaRepository<Token, Integer> {

    @Transactional
    void deleteByEmail(String email);

    Token getByToken(String token);
}
